//package com.lmq
//
//import org.apache.spark.SparkContext
//import org.apache.spark.broadcast.Broadcast
//import org.apache.spark.util.LongAccumulator
//
//object WordBlacklist {
//  @volatile private var instance: Broadcast[Seq[String]] = null
//
//  def getInstance(sc: SparkContext): Broadcast[Seq[String]] = {
//    if (instance == null) {
//      synchronized {
//        if (instance == null) {
//          val wordBlacklist = Seq("a", "b", "c")
//          instance = sc.broadcast(wordBlacklist)
//        }
//      }
//    }
//    instance
//  }
//}
//
//object DroppedWordsCounter {
//
//  @volatile private var instance: LongAccumulator = null
//
//  def getInstance(sc: SparkContext): LongAccumulator = {
//    if (instance == null) {
//      synchronized {
//        if (instance == null) {
//          instance = sc.longAccumulator("wordsInBlacklistCounter")
//        }
//        instance
//
//      }
//    }
//  }
//
//
//}
